/* 需要权限判断的路由 */
//台账信息
const Book = () => import('@/pages/book')

//设备管理
const Unit = () => import('@/pages/unit')
const UnitInput = () => import('@/pages/unit/input')
const UnitInfo = () => import('@/pages/unit/info')
const UnitMaintain = () => import('@/pages/unit/maintain')

//设备配件管理
const Spare = () => import('@/pages/spare')
const SpareInput = () => import('@/pages/spare/input')
const SpareInfo = () => import('@/pages/spare/info')

//用户  部门  管理
const User = () => import('@/pages/user')
const Dept = () => import('@/pages/dept')

const dynamicRoutes = [
    {
        path:'/book',
        component:Book,
        name: "book",
        meta:{
            name:'台账管理',
            icon:'tree'
        }
    },
    {
        path:'/unit',
        component:Unit,
        name: "unit",
        meta:{
            name:'设备管理',
            icon:'tree'
        },
        children:[
            {
                path:'input',
                component: UnitInput,
                name:'unit-input',
                meta:{
                    name:'设备录入',
                    icon:'tree'
                }
            },
            {
                path:'info',
                component: UnitInfo,
                name:'unit-info',
                meta:{
                    name:'设备信息',
                    icon:'tree'
                }
            },
            {
                path:'maintain',
                component: UnitMaintain,
                name:'unit-maintain',
                meta:{
                    name:'设备维护',
                    icon:'tree'
                }
            }
        ]
    },
    {
        path:'/spare',
        component:Spare,
        name: "spare",
        meta:{
            name:'配件管理',
            icon:'tree'
        },
        children:[
            {
                path:'input',
                component: SpareInput,
                name:'spare-input',
                meta:{
                    name:'配件录入',
                    icon:'tree'
                }
            },
            {
                path:'info',
                component: SpareInfo,
                name:'spare-info',
                meta:{
                    name:'配件信息',
                    icon:'tree'
                }
            }
        ]
    },
    {
        path:'/user',
        component:User,
        name: "user",
        meta:{
            name:'用户管理',
            icon:'tree'
        }
    },
    {
        path:'/dept',
        component:Dept,
        name: "dept",
        meta:{
            name:'部门管理',
            icon:'tree'
        }
    }
]

export default dynamicRoutes
